﻿using Domain;
using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.AppService.SGAppService
{
    public class SGAppService : ISGAppService
    {
        private readonly ISGRepository sgRepository;

        public SGAppService(ISGRepository sgRepository)
        {
            this.sgRepository = sgRepository;
        }

        public Task<bool> AddSgAsync(SG sg)
        {
            return sgRepository.AddSgAsync(sg);
        }

        public SGFenYe DateSGAsync(string SalaryGrantId, string gzc, DateTime startDate, DateTime endDate, int page, int pageSize)
        {
           return  sgRepository.DateSGAsync(SalaryGrantId, gzc, startDate, endDate, page, pageSize);
        }

        public Task<bool> RemoveSGAsync(string SalaryGrantId, double totalCostS, string Checker)
        {
            return sgRepository.RemoveSGAsync(SalaryGrantId, totalCostS, Checker);
        }

        public SGFenYe SelectSGFenYeAsync(int page, int pageSize)
        {
           return sgRepository.SelectSGFenYe(page, pageSize);
        }
    }
}
